{ "swagger": "2.0", "info": { "title": "Abstract Timezones", "contact": { "name": "Fördős András", "email": "fordosa90+ipc_abstrtimezone@gmail.com" }, "description": "The Abstract Time, Date, and Timezone service is the easiest way to find, convert, and manage time and timezone data across the world.", "version": "1.1" }, "host": "timezone.abstractapi.com", "basePath": "/", "schemes": [ "https" ], "consumes": [], "produces": [], "paths": { "/v1/current_time": { "get": { "responses": { "200": { "description": "OK", "schema": { "type": "object", "properties": { "datetime": { "type": "string", "description": "The current date and time of the requested location.", "title": "Datetime" }, "timezone_name": { "type": "string", "description": "Timezone's name from the IANA Time Zone Database.", "title": "Timezone name" }, "timezone_location": { "type": "string", "description": "Timezone's location.", "title": "Timezone location" }, "timezone_abbreviation": { "type": "string", "description": "Timezone's abbreviation, also from the IANA Time Zone Database.", "title": "Timezone abbreviation" }, "gmt_offset": { "type": "integer", "format": "int32", "description": "Timezone's offset from Greenwich Mean Time (GMT).", "title": "GMT offset" }, "is_dst": { "type": "boolean", "description": "True if the location is currently in Daylight Savings Time (DST).", "title": "Is DST" }, "requested_location": { "type": "string", "description": "The location from the request.", "title": "Requested location" }, "latitude": { "type": "number", "format": "float", "description": "Decimal of the longitude found for the requested location.", "title": "Latitude" }, "longitude": { "type": "number", "format": "float", "description": "Decimal of the longitude found for the requested location.", "title": "Longitude" } } } } }, "summary": "Current time", "operationId": "GetCurrentTime", "description": "The current_time endpoint take a location in the form of a location name, latitude and longitude, or IP address and returns the current time, date, and timezone of that location.", "parameters": [ { "name": "location", "in": "query", "required": true, "type": "string", "x-ms-summary": "Location", "description": "The location to determine the current time and timezone of. This parameter accepts the location as a string (e.g., Los Angeles, CA), a longitude and latitude (e.g., -31.4173391,-64.183319) , or an IP address (e.g., 82.111.111.111)" } ] } }, "/v1/convert_time": { "get": { "responses": { "200": { "description": "OK", "schema": { "type": "object", "properties": { "base_location": { "type": "object", "properties": { "datetime": { "type": "string", "description": "The current date and time of the requested location.", "title": "Datetime" }, "timezone_name": { "type": "string", "description": "Timezone's name from the IANA Time Zone Database.", "title": "Timezone name" }, "timezone_location": { "type": "string", "description": "Timezone's location.", "title": "Timezone location" }, "timezone_abbreviation": { "type": "string", "description": "Timezone's abbreviation, also from the IANA Time Zone Database.", "title": "Timezone abbreviation" }, "gmt_offset": { "type": "number", "format": "float", "description": "Timezone's offset from Greenwich Mean Time (GMT).", "title": "GMT offset" }, "is_dst": { "type": "boolean", "description": "True if the location is currently in Daylight Savings Time (DST).", "title": "Is DST" }, "requested_location": { "type": "string", "description": "The location from the request.", "title": "Requested location" }, "latitude": { "type": "number", "format": "float", "description": "Decimal of the longitude found for the requested location.", "title": "Latitude" }, "longitude": { "type": "number", "format": "float", "description": "Decimal of the longitude found for the requested location.", "title": "Longitude" } }, "description": "The JSON Object containing the time and timezone details of the base location from the request.", "title": "Base location" }, "target_location": { "type": "object", "properties": { "datetime": { "type": "string", "description": "The current date and time of the requested location.", "title": "Datetime" }, "timezone_name": { "type": "string", "description": "Timezone's name from the IANA Time Zone Database.", "title": "Timezone name" }, "timezone_location": { "type": "string", "description": "Timezone's location.", "title": "Timezone location" }, "timezone_abbreviation": { "type": "string", "description": "Timezone's abbreviation, also from the IANA Time Zone Database.", "title": "Timezone abbreviation" }, "gmt_offset": { "type": "number", "format": "float", "description": "Timezone's offset from Greenwich Mean Time (GMT).", "title": "GMT offset" }, "is_dst": { "type": "boolean", "description": "True if the location is currently in Daylight Savings Time (DST).", "title": "Is DST" }, "requested_location": { "type": "string", "description": "The location from the request.", "title": "Requested location" }, "latitude": { "type": "number", "format": "float", "description": "Decimal of the longitude found for the requested location.", "title": "Latitude" }, "longitude": { "type": "number", "format": "float", "description": "Decimal of the longitude found for the requested location.", "title": "Longitude" } }, "description": "The JSON Object containing the time and timezone details of the target location from the request.", "title": "Target location" } } } } }, "summary": "Convert time", "operationId": "ConvertTime", "description": "Convert the time and date of a given location to the time and date of another location. By default it converts the current time, but the conversion can take place in either the past or future with a simple parameter.", "parameters": [ { "name": "base_location", "in": "query", "required": true, "type": "string", "x-ms-summary": "Base location", "description": "The location you use as a base to convert the datetime for. This parameter accepts the location as a string (e.g., Los Angeles, CA), a longitude and latitude (e.g., -31.4173391,-64.183319) , or an IP address (e.g., 82.111.111.111)" }, { "name": "target_location", "in": "query", "required": true, "type": "string", "x-ms-summary": "Target location", "description": "The location you want to get the datetime for. This parameter accepts the location as a string (e.g., Los Angeles, CA), a longitude and latitude (e.g., -31.4173391,-64.183319) , or an IP address (e.g., 82.111.111.111)" }, { "name": "base_datetime", "in": "query", "required": false, "type": "string", "x-ms-summary": "Base datetime", "description": "The current datetime you\u2019re converting, expected format 'YYYY-MM-DD HH:MI:SS'. If empty, defaulted to 'now'." } ] } } }, "definitions": {}, "parameters": {}, "responses": {}, "securityDefinitions": { "API Key": { "type": "apiKey", "in": "query", "name": "api_key" } }, "security": [ { "API Key": [] } ], "tags": [], "x-ms-connector-metadata": [ { "propertyName": "Website", "propertyValue": "https://docs.abstractapi.com/timezones" }, { "propertyName": "Privacy policy", "propertyValue": "https://www.abstractapi.com/legal/dpa" }, { "propertyName": "Categories", "propertyValue": "Data;Business Intelligence" } ] }